package config.redis

import org.springframework.beans.factory.annotation.Autowired
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory
import org.springframework.data.redis.core.ReactiveStringRedisTemplate

/**
 * @author  fly
 * @date  2021/7/29 11:19
 * @version 1.0
 */
@Configuration
class RedisConfig {


    @Autowired
    private lateinit var connectionFactory: ReactiveRedisConnectionFactory

    @Bean
    fun reactiveStringRedisTemplate(): ReactiveStringRedisTemplate =
        ReactiveStringRedisTemplate(connectionFactory)

}